package com.zhiwang.planet.util

import com.zhiwang.planet.BuildConfig
import java.lang.StringBuilder

class SkStore {

    companion object {


        private fun baseUrl(): String = if (AppHelper.testEnv()) BuildConfig.DEBUG_TEST_BASE_URL else BuildConfig.BASE_URL

        private fun ji7BaseUrl(): String = if (AppHelper.testEnv()) BuildConfig.DEBUG_Ji7_BASE_URL else BuildConfig.Ji7_BASE_URL

        private fun ji7AppBaseUrl(): String = if (AppHelper.testEnv()) BuildConfig.DEBUG_Ji7_APP_BASE_URL else BuildConfig.RELEASE_Ji7_APP_BASE_URL

        val dwLatest = baseUrl() + "app_shandianwan/lastest_play"

        private val dwGameUrl = baseUrl() + "app_shandianwan/into_game"


        val dwIndex = baseUrl() + "app_shandianwan/shandianwan"


        fun dwLatestUrl(userid: String): String {
            return "$dwLatest?userid=$userid"
        }

        fun dwGameUrl(gid: String, userid: String): String {
            val sb = StringBuilder(25)
            sb.append(dwGameUrl)
            sb.append("?gid=$gid&userid=$userid")
            return sb.toString()
        }
    }
}